package com.itheima.nosafe.order.controller;

import com.alibaba.fastjson.JSON;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 * @version 1.0
 **/
@RestController
public class OrderController {

    @GetMapping(value = "/r1")
    //@ResponseBody
    public String r1(){
        //获取用户身份信息

        //微服务转发明文先注释掉postman测试
        //UserDTO  userDTO = (UserDTO) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
        return "访问资源1";
    }

    @GetMapping(value = "/u9")
    public String u9(){
        //获取用户身份信息
        //UserDTO  userDTO = (UserDTO) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
        return /*userDTO.getFullname()+*/"访问资源9";
    }

}